package config;

import org.apache.commons.digester.Digester;
import org.apache.commons.digester.xmlrules.DigesterLoader;
import org.xml.sax.SAXException;

import java.io.IOException;

/**
 * @author 石小俊
 * @date 2024年03月30日 14:12
 */
public class Test {

    public static void main(String[] args) {
        Digester digester = DigesterLoader.createDigester(Test.class.getClassLoader().getResource("config/rule.xml"));
        ActionMapping actionMapping = new ActionMapping();
        digester.push(actionMapping);
        try {
            digester.parse(Test.class.getClassLoader().getResourceAsStream("actions.xml"));
            System.out.println(actionMapping);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (SAXException e) {
            e.printStackTrace();
        }

    }

}
